<h1>Danh sach nganh hoc </h1>
<table style="border: #000 1px solid">
    <tr>
        <td>ID</td>
        <td>Ten Nganh hoc</td>
        <td>Trang thai</td>
    </tr>
    <?php foreach ($result as $row):?>
    <tr>
        <td><?=$row['id'];?></td>
        <td><?=$row['TenNganhHoc'];?></td>
        <td><?php if ($row['anhien']==0) echo "An"; 
                  else echo "Hien";?>
        </td>
    </tr>
    <?php endforeach;?>
</table>
<h1> Create </h1>
<?php echo form_open('/nganhhoc/create');?>
    <label for="name">Ten Nganh Hoc</label>
    <input name="name" type="text">
    <input type="submit" value="Create">
<?php echo form_close();?>

<h1> Delete </h1>
<?php echo form_open('/nganhhoc/delete');?>
    <label for="id">ID Nganh Hoc</label>
    <input name="id" type="number">  
    <input type="submit" value="Delete">
<?php echo form_close();?>

<h1> Edit all </h1>
<?php echo form_open('/nganhhoc/edit');?>
    <label for="id">ID Nganh Hoc</label>
    <input name="id" type="number">
    <label for="name">Ten Nganh Hoc</label>
    <input name="name" type="text">
    <select name="status">
            <option value="0">An</option>
            <option value="1">Hien</option>
    </select>
    <input type="submit" value="Edit">
<?php echo form_close();?>

<h1> Edit Name </h1>
<?php echo form_open('/nganhhoc/edit_name');?>
    <label for="id">ID Nganh Hoc</label>
    <input name="id" type="number">
    <label for="name">Ten Nganh Hoc</label>
    <input name="name" type="text">
    <input type="submit" value="Edit">
<?php echo form_close();?>

<h1> Edit Trang Thai </h1>
<?php echo form_open('/nganhhoc/edit');?>
    <label for="id">ID Nganh Hoc</label>
    <input name="id" type="number">
    <select name="status">
            <option value="0">An</option>
            <option value="1">Hien</option>
    </select>
    <input type="submit" value="Edit">
<?php echo form_close();?>